<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
{# 定义宏，传入参数 #}
{% import 'cFlaskBase/macro.html' as m %}
{# 调用宏 #}
{{ m.func() }}
<hr>
{# wtf表单 #}
{% if form %}
    <form method="GET">
        <p>{{ form.csrf_token() }}</p>
        <p>user: {{ form.user }}</p>
        <p>pswd: {{ form.pswd }}</p>
        <p>pswd2: {{ form.pswd2 }}</p>
        <p>{{ form.submit }}</p>
        {% for x in get_flashed_messages() %}
            {{ x }}
        {% endfor %}
    </form>
    <hr>
{% endif %}
{# 手写表单 #}
{% if False %}
    <form method="post">
        <p>用户：<input type="text" name="user" placeholder="user"></p>
        <p>密码：<input type="password" name="pswd" placeholder="pswd"></p>
        <p>确认密码：<input type="password" name="pswd2" placeholder="pswd2"></p>
        <p><input type="submit"></p>
    </form>
{% endif %}
</body>
</html>